layui.use(['element','form','util'], function(){
  var element = layui.element,
  form = layui.form,
  util = layui.util; //导航的hover效果、二级菜单等功能，需要依赖element模块
  
  //监听导航点击
  element.on('nav(demo)', function(elem){
	//console.log(elem)
	layer.msg(elem.text());
	console.log(111)
  });
  
  //监听提交
    form.on('submit(formDemo)', function(data){
      layer.msg(JSON.stringify(data.field));
      return false;
    });
	
	util.fixbar({
	    top: true
	});
	
});